package com.taotao.portal.service;


import java.util.List;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.taotao.pojo.TaotaoResult;
import com.taotao.portal.pojo.CartItem;

/**
 *  购物车Service
 *  @author  DaiRui  
 *  @ClassName  : CartService
 *  @Description:
 *  @date  2017年4月17日 下午5:34:23 
 *  @Version  1.0
 */
public interface CartService {

	/**
	 * 取购物车列表
	 * @param request
	 * @param response
	 * @return
	 */
	public List<CartItem> getItemList(HttpServletRequest request);
	
	/**
	 * 添加到购物车
	 * @param itemId
	 * @param num
	 * @param request
	 * @param response
	 * @return
	 */
	public TaotaoResult addCartItem(Long itemId,Integer num,HttpServletRequest request,HttpServletResponse response);
	
	/**
	 * 获取购物车列表
	 * @return
	 */
	public List<CartItem> getCartItemList(HttpServletRequest request);	
	/**
	 * 更新购物车商品的数量
	 * @param request
	 * @return
	 */
	public TaotaoResult updateCartItemNum(Long itemId,Integer num,HttpServletRequest request,HttpServletResponse response);
	/**
	 * 删除购物车商品
	 * @param itemId
	 * @param num
	 * @param request
	 * @param response
	 * @return
	 */
	public TaotaoResult deleteCartItem(Long itemId,HttpServletRequest request,HttpServletResponse response);
}
